//创建一个Random类的对象generator，编写语句在以下选项范围内产生随机数（包含右边界值），使用接收一个整形参数的nextInt方法。
import java.util.Random;
public class SR3_19
{ 
  public static void main(String[] args)
  {
    Random generator = new Random();
    int a;

    a = generator.nextInt(31);
    System.out.println("From 0 to 30:"+ a);

    a = generator.nextInt(10)+10;
    System.out.println("From 10 to 19:"+ a);

    a = generator.nextInt(11)-5;
    System.out.println("From -5 to 5:"+ a);
    }
  }  
